/**
 * 安卓白金英雄坛制作组
 * <br>
 * 文件名：DaLiJinGangZhi.java
 * <br>
 * 创建时间：2015-3-28 下午9:39:18
 * <br>
 * 所属项目：GmudEX
 * <br>
 *
 * @author 12548
 *         <br>
 */
package lostland.gmud.exv2.battle.proc.stunt;

import com.orhanobut.logger.Logger;

import lostland.gmud.exv2.battle.BattleScreen;
import lostland.gmud.exv2.battle.ViewScreen;
import lostland.gmud.exv2.battle.proc.Status;
import lostland.gmud.exv2.battle.proc.StuntScreen;
import lostland.gmud.exv2.data.Npc;
import lostland.gmud.exv2.data.Room;

/**
 * 类名：DaLiJinGangZhi
 * <br>
 * 说明：大力金刚指
 *
 * @author 12548
 */
public class DaLiJinGangZhi extends Status {


	/**
	 * @param zdp
	 * @param bdp
	 */
	public DaLiJinGangZhi(Npc zdp, Npc bdp) {
		super(zdp, bdp);
	}

	/*
	 * （非 Javadoc）
	 * @see lostland.gmud.exv2.battle.proc.Status#execute()
	 */
	@Override
	public void execute() {

		double hit_rate = (zdp.getAttr(Room.ATTR_STR) - bdp.getAttr(Room.ATTR_STR) + 70.0) / 100.0;

		Logger.i("命中率=" + hit_rate);

		zdp.setStr_bouns(zdp.getStr_bouns() + 10);

		boolean hit = Math.random() < hit_rate;

		if (hit) {
			new ViewScreen(BattleScreen.bsp(zdp, bdp,
					"$n顿时觉得一股无穷无尽的破坏力从$1处扩散向全身，一口鲜血从嘴角溢出，身体一时竟无法动弹。")).pushToGame();
			bdp.dmg(zdp.getAttr(Room.ATTR_STR) * 8, 0);
			bdp.setTransfixed(bdp.getDz() + 1);
		} else {
			new ViewScreen(BattleScreen.bsp(zdp, bdp,
					"结果$n连忙退避三舍，躲开了这力大无穷的一击。")).pushToGame();
			zdp.setTransfixed(zdp.getDz() + 3);
		}

		StuntScreen.StuntOver();
	}

}
